package com.base.system.base.init;

import com.base.system.config.AppConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.annotation.Order;

/**
 * 系统初始化加载器（最优先加载的），可以配置多个,需要去启动类中配置springApplication.addInitializers(new SystemFirstInit());
 */
@Slf4j
@Order(1)
public class SystemFirstInit implements ApplicationContextInitializer<ConfigurableApplicationContext> {
    @Override
    public void initialize(ConfigurableApplicationContext configurableApplicationContext) {
        log.info("系统初始化加载器（最优先加载的），正在执行中......");
    }
}
